<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateSampleRequestTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('sample_request', function(Blueprint $table)
		{
			$table->increments('id');
			$table->boolean('approved')->default(0);
			$table->dateTime('submit_time');
			$table->integer('sample');
			$table->integer('project');
			$table->integer('submit_by');
			$table->integer('approved_by')->nullable();
			$table->dateTime('approved_time')->nullable();
			$table->text('submitter_comments', 65535)->nullable();
			$table->text('approver_comments', 65535)->nullable();
			$table->boolean('isretrieve')->default(1);
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('sample_request');
	}

}
